package org.come.Jpanel;

import com.tool.btn.FormsOnOffBtn;
import com.tool.btn.XYBtn;
import com.tool.image.ImageMixDeal;
import com.tool.tcp.Sprite;
import com.tool.tcp.SpriteFactory;
import org.come.until.CutButtonImage;

import javax.swing.*;
import java.awt.*;

public class XYXJpanel extends JPanel {

    public static XYBtn[] xinlu=new XYBtn[3];

    public static Image image = CutButtonImage.getImage("skin/8100226/mouse/xyxjbj.png", 510, 362).getImage();


    public XYXJpanel() {
        setPreferredSize(new Dimension(901, 548));
        setOpaque(false);
        setLayout(null);

        FormsOnOffBtn offBtn = new FormsOnOffBtn("skin/8100226/button/1.png", 1, 128);// 800 10
        offBtn.setBounds(800, 10, 25, 25);
        this.add(offBtn);

        xinlu[0]=new XYBtn("skin/8100226/button/心路2.png",1,16,this,1);
        xinlu[0].setBounds(803,104,37,82);
        this.add(xinlu[0]);
        xinlu[1]=new XYBtn("skin/8100226/button/心意2.png",1,45,this,1);
        xinlu[1].setBounds(803,184,37,82);
        this.add(xinlu[1]);

        xinlu[2]=new XYBtn("skin/8100226/button/心经1.png",1,18,this,1);
        xinlu[2].setBounds(803,264,37,82);
        this.add(xinlu[2]);

    }
    private ImageIcon icon;

    static Sprite xybj = SpriteFactory.VloadSprite("skin/8100226/mouse/xybj", null);//特效路径
//    static Sprite xyxjs1 = SpriteFactory.VloadSpriteAes("skin/8100226/mouse/xyxjs1", null);//心静石
//    static Sprite xyxjs2 = SpriteFactory.VloadSpriteAes("skin/8100226/mouse/xyxjs1", null);//心静石
//    static Sprite xyxjs3 = SpriteFactory.VloadSpriteAes("skin/8100226/mouse/xyxjs3", null);//特效路径
//
//    static Sprite xyxjs3_1 = SpriteFactory.VloadSpriteAes("skin/8100226/mouse/xyxjs3", null);//特效路径
//    static Sprite xyxjs3_2 = SpriteFactory.VloadSpriteAes("skin/8100226/mouse/xyxjs3", null);//特效路径
//    static Sprite xyxjs3_3 = SpriteFactory.VloadSpriteAes("skin/8100226/mouse/xyxjs3", null);//特效路径
//    static Sprite xyxjs3_4 = SpriteFactory.VloadSpriteAes("skin/8100226/mouse/xyxjs3", null);//特效路径
//    static Sprite xyxjs3_5 = SpriteFactory.VloadSpriteAes("skin/8100226/mouse/xyxjs3", null);//特效路径

    static Sprite xjxjs4 = SpriteFactory.VloadSprite("skin/8100226/mouse/xyxjs4", null);//特效路径
    static Sprite xycszl = SpriteFactory.VloadSprite("skin/8100226/mouse/xycszl", null);////成圣之旅


    private ImageIcon xyxt = new ImageIcon("skin/8100226/button/心条.png");

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);


        if(xybj != null){
            xybj.updateToTime(ImageMixDeal.userimg.getTime(), 0);
            xybj.draw(g, 0, 0);
        }

        g.drawImage(xyxt.getImage(), 805, 60, 26, 411, this);

        if(xycszl != null){
            xycszl.updateToTime(ImageMixDeal.userimg.getTime(), 0);
            xycszl.draw(g, 10, 50);
        }

        xjxjs4.updateToTime(ImageMixDeal.userimg.getTime(), 0);
        xjxjs4.draw(g, 670, 330);

        g.drawImage(image, 220, 90, null);
    }


}
